import { IntersectionType, OmitType, PartialType } from '@nestjs/swagger'
import { ListPaginationDto } from '@/shared/types/globalDto.dto'
import { Notice, NoticeConfig } from '../entities/notice.entity'

export class CreateNoticeDto extends OmitType(Notice, ['noticeId', 'createdAt', 'updatedAt']) {}
export class UpdateNoticeDto extends PartialType(CreateNoticeDto) {}
export class FindOneNoticeDto extends PartialType(Notice) {}

export class ListPaginationNoticeDto extends PartialType(IntersectionType(FindOneNoticeDto, ListPaginationDto)) {}

export class ListPaginationNoticeVo {
  total: number
  list: Notice[]
}

export class CreateNoticeConfigDto extends OmitType(NoticeConfig, ['noticeConfigId', 'updatedAt']) {}
export class UpdateNoticeConfigDto extends CreateNoticeConfigDto {}
export class FindOneNoticeConfigDto {}
